﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FlowgraphViewer.Services.Parsers
{
    public class PointParser
    {
        public static Point Parse(string toParse)
        {
            Point p = new Point();
            string[] arr = toParse.Split(',');

            if (arr.Length < 3)
                throw new ArgumentException("Point must be in x,y,z format");

            p.X = Double.Parse(arr[0]);
            p.Y = Double.Parse(arr[1]);

            return p;
        }
    }
}
